//
//  JHNavigationController.swift
//  JHWeiBo
//
//  Created by qujiahong on 2019/3/21.
//  Copyright © 2019 iOS_July. All rights reserved.
//

import UIKit

class JHNavigationController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()

    }

    //MARK: - 重写push
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        
        //要判断，是否是栈底根控制器，栈底不需要隐藏
        if children.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        
        
        
        super.pushViewController(viewController, animated: true)
        
        
    }

}
